import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
import safeguardprocedures from "../assets/images/保护措施.png";

const router = new VueRouter({
  routes: [
    { path: "/", redirect: "/home" },
    {
      path: "/home",
      name: "主页",
      component: () => import("@/components/home"),
      url: safeguardprocedures,
    },
    {
      path: "/history",
      name: "自然历史",
      redirect: "/modern",
      component: () => import("@/components/history"),
      children: [
        {
          path: "/modern",
          name: "近代灭绝状况",
          component: () => import("@/components/modern"),
        },
        {
          path: "/DidOut",
          name: "生物大灭绝",
          component: () => import("@/components/DidOut"),
        },
        {
          path: "/achievement",
          name: "保护区现代成就",
          component: () => import("@/components/achievement"),
        },
      ],
    },
    {
      path: "/animal",
      name: "濒危动物数据库",
      component: () => import("@/components/animal"),
    },
    {
      path: "/protect",
      name: "保护措施",
      component: () => import("@/components/protect"),
    },
  ],
});

export default router;
